<? //CUSTOMERS_view.php;
$msg="";
if(isset($_GET["msg"]))
{
	$msg = $_GET["msg"];
}
include("CUSTOMERS_session.php");
$find_class = new SessionCUSTOMERS();
$datas = $find_class->findall();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CUSTOMERS</title>
<link href="css/globalcss.css" rel="stylesheet" type="text/css">
<link href="css/defaulttheme.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="defaulttheme"><table width="90%" cellspacing="0" cellpadding="0" border="0" class="gridTable">
    <tbody><tr>
        <td>
            <table cellspacing="0" cellpadding="0" border="0" class="gridHeader">
                <tbody><tr>
                    <td nowrap="" class="gridHeaderBGLeft"> </td>
                    <td colspan="4" class="gridHeaderBG">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
                            <tbody><tr>
                                <td valign="baseline"><span class="gridHeaderText">
                                CUSTOMERS
                                </span></td>
                            </tr>
                        </tbody></table>
                    </td>
                    <td nowrap="" class="gridHeaderBGRight"> </td>
                </tr>
            </tbody></table>
            <table cellspacing="0" cellpadding="0" border="0" class="gridToolBar">
                <tbody><tr>
                    <td colspan="4">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
                            <tbody><tr>
                                <td valign="baseline">
                                <?=$msg;?>
                                                                </td>
                                <td align="right">
<a class="gridToolBarLink" title="Add New Record" href="CUSTOMERS_add.php"><img border="0" src="./images/defaultbutton/add.gif"></a>                             
		</td>
                            </tr>
                        </tbody></table>
                    </td>
                </tr>
            </tbody></table>
            <table cellspacing="0" cellpadding="0" border="0" class="gridMain">
                <tbody><tr> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           CustomerID
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           FirstName
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           LastName
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Class
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Room
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Building
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Address1
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Address2
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           City
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           State
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           PostalCode
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Country
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Phone
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Email
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           VoiceMail
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           Passwords
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           CreditCard
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           CreditCardTypeID
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           CardExpMo
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           CardExpYr
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           BillingAddress
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           BillingCity
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           BillingRegion
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           BillingPostalCode
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           BillingCountry
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           ShipAddress
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           SHipCity
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           ShipRegion
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           ShipPostalCode
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           ShipCountry
                        </div>
                    </td> <td nowrap="" class="gridColumn">
                        <div class="gridColumnText">
                           DateEntered
                        </div>
                    </td>
                    <td width="40px" nowrap="" class="gridColumn">
                    </td>
                    <td width="40px" nowrap="" class="gridColumn">
                    </td>
<? foreach($datas as $data)
{
	
	?>                  
                </tr>
<tr class="gridRow"><td align="right"><?=$data["CustomerID"];?></td><td align="right"><?=$data["FirstName"];?></td><td align="right"><?=$data["LastName"];?></td><td align="right"><?=$data["Class"];?></td><td align="right"><?=$data["Room"];?></td><td align="right"><?=$data["Building"];?></td><td align="right"><?=$data["Address1"];?></td><td align="right"><?=$data["Address2"];?></td><td align="right"><?=$data["City"];?></td><td align="right"><?=$data["State"];?></td><td align="right"><?=$data["PostalCode"];?></td><td align="right"><?=$data["Country"];?></td><td align="right"><?=$data["Phone"];?></td><td align="right"><?=$data["Email"];?></td><td align="right"><?=$data["VoiceMail"];?></td><td align="right"><?=$data["Passwords"];?></td><td align="right"><?=$data["CreditCard"];?></td><td align="right"><?=$data["CreditCardTypeID"];?></td><td align="right"><?=$data["CardExpMo"];?></td><td align="right"><?=$data["CardExpYr"];?></td><td align="right"><?=$data["BillingAddress"];?></td><td align="right"><?=$data["BillingCity"];?></td><td align="right"><?=$data["BillingRegion"];?></td><td align="right"><?=$data["BillingPostalCode"];?></td><td align="right"><?=$data["BillingCountry"];?></td><td align="right"><?=$data["ShipAddress"];?></td><td align="right"><?=$data["SHipCity"];?></td><td align="right"><?=$data["ShipRegion"];?></td><td align="right"><?=$data["ShipPostalCode"];?></td><td align="right"><?=$data["ShipCountry"];?></td><td align="right"><?=$data["DateEntered"];?></td><td align="center"><a class="gridBodyLink" target="_self" title="Edit" href="CUSTOMERS_edit.php?id=<?=$data["id"];?>"><img border="0" src="./images/defaultbutton/edit.gif"></a></td>
<td align="center"><a class="gridBodyLink" target="_self" title="Delete" href="CUSTOMERS_delete.php?id=<?=$data["id"];?>"><img border="0" src="./images/defaultbutton/delete.gif"></a></td>
</tr>
<?

}
?>

            </tbody></table>
            <table cellspacing="0" cellpadding="0" border="0" class="gridFooter">
                <tbody><tr>
                    <td nowrap="" class="gridFooterLeft"> </td>
                    <td colspan="4" class="gridFooterBG">

                    </td>
                    <td nowrap="" class="gridFooterRight"> </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>
</div>
</body>
</html>
